import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/myshouye',
    name: 'myshouye',
    component: () => import('../views/MyShouye.vue'),

    children: [
      {
        path: '/myshouye/shouye',
        name: 'shouye',
        component: () => import('../views/wifls/shouye.vue')
      },
      {
        path: '/myshouye/baobaotuan',
        name: 'baobaotuan',
        component: () => import('../views/wifls/baobaotuan.vue')
      },
      {
        path: '/myshouye/dingdan',
        name: 'dingdan',
        component: () => import('../views/wifls/dingdan.vue')
      },
      {
        path: '/myshouye/wode',
        name: 'wode',
        component: () => import('../views/wifls/wode.vue')
      },
      {
        path: '/myshouye',
        redirect: '/myshouye/shouye'
      }
    ]
  },
  {
    path: '/',
    redirect: '/myshouye'
  }

]


const router = new VueRouter({
  mode: 'hash',// history
  base: process.env.BASE_URL,
  routes
})

export default router



